home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 100 / CD-ROM 100.iso / aplic / oo1_1 / f_0371 / docbooktosoffheadings.xsl
Encoding:
Extensible Markup Language  |  2003-06-12  |  39.5 KB  |  1,151 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.  #  The Contents of this file are made available subject to the terms of
  4.  #  either of the following licenses
  5.  #
  6.  #         - GNU Lesser General Public License Version 2.1
  7.  #         - Sun Industry Standards Source License Version 1.1
  8.  #
  9.  #  Sun Microsystems Inc., October, 2000
  10.  #
  11.  #  GNU Lesser General Public License Version 2.1
  12.  #  =============================================
  13.  #  Copyright 2000 by Sun Microsystems, Inc.
  14.  #  901 San Antonio Road, Palo Alto, CA 94303, USA
  15.  #
  16.  #  This library is free software; you can redistribute it and/or
  17.  #  modify it under the terms of the GNU Lesser General Public
  18.  #  License version 2.1, as published by the Free Software Foundation.
  19.  #
  20.  #  This library is distributed in the hope that it will be useful,
  21.  #  but WITHOUT ANY WARRANTY; without even the implied warranty of
  22.  #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  23.  #  Lesser General Public License for more details.
  24.  #
  25.  #  You should have received a copy of the GNU Lesser General Public
  26.  #  License along with this library; if not, write to the Free Software
  27.  #  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  28.  #  MA  02111-1307  USA
  29.  #
  30.  #
  31.  #  Sun Industry Standards Source License Version 1.1
  32.  #  =================================================
  33.  #  The contents of this file are subject to the Sun Industry Standards
  34.  #  Source License Version 1.1 (the "License"); You may not use this file
  35.  #  except in compliance with the License. You may obtain a copy of the
  36.  #  License at http://www.openoffice.org/license.html.
  37.  #
  38.  #  Software provided under this License is provided on an "AS IS" basis,
  39.  #  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
  40.  #  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
  41.  #  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
  42.  #  See the License for the specific provisions governing your rights and
  43.  #  obligations concerning the Software.
  44.  #
  45.  #  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
  46.  #
  47.  #  Copyright: 2000 by Sun Microsystems, Inc.
  48.  #
  49.  #  All Rights Reserved.
  50.  #
  51.  #  Contributor(s): _______________________________________
  52.  #
  53.  #
  54.  -->
  55. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"
  56. xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing"  xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script" xmlns:config="http://openoffice.org/2001/config" office:class="text" office:version="1.0">
  57.     <xsl:decimal-format name="staff" digit="D" />
  58. <xsl:template match="/">
  59.     <xsl:element name="office:document">
  60.             <office:meta>
  61.         <meta:generator>StarOffice 6.1 (Solaris Sparc)</meta:generator>
  62.         <dc:title><xsl:value-of select="/article/articleinfo/title"/></dc:title>
  63.         <dc:description></dc:description>
  64.         <dc:subject></dc:subject>
  65.         <meta:creation-date>2002-07-15T12:38:53</meta:creation-date>
  66.         <dc:date><xsl:value-of select="article/articleinfo/pubdate"/></dc:date>
  67.         <dc:language><xsl:value-of select="article/@lang"/></dc:language>
  68.         <meta:editing-cycles>21</meta:editing-cycles>
  69.         <meta:editing-duration>P1DT0H11M54S</meta:editing-duration>
  70.         <meta:user-defined meta:name="Info 1"/>
  71.         <meta:user-defined meta:name="Info 2"/>
  72.         <meta:user-defined meta:name="Info 3"/>
  73.         <meta:user-defined meta:name="Info 4"/>
  74.         <meta:document-statistic meta:table-count="1" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="42" meta:word-count="144" meta:character-count="820"/>
  75.     </office:meta>
  76.     <office:automatic-styles>
  77.         <style:style style:name="fr1" style:family="graphics" style:parent-style-name="Graphics" ><style:properties style:horizontal-pos="center" style:horizontal-rel="paragraph" style:mirror="none" fo:clip="rect(0cm 0cm 0cm 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="1" draw:color-inversion="false" draw:transparency="-100%" draw:color-mode="standard" ></style:properties>
  78. </style:style>
  79.  
  80.         <style:style style:name="Table1" style:family="table">
  81.             <style:properties style:width="14.649cm" table:align="margins"/>
  82.         </style:style>
  83.         <style:style style:name="Table1.A" style:family="table-column">
  84.             <style:properties style:column-width="2.93cm" style:rel-column-width="13107*"/>
  85.         </style:style>
  86.         <style:style style:name="Table1.A1" style:family="table-cell">
  87.             <style:properties fo:padding="0.097cm" fo:border-left="0.002cm solid #000000" fo:border-right="none" fo:border-top="0.002cm solid #000000" fo:border-bottom="0.002cm solid #000000"/>
  88.         </style:style>
  89.         <style:style style:name="Table1.E1" style:family="table-cell">
  90.             <style:properties fo:padding="0.097cm" fo:border="0.002cm solid #000000"/>
  91.         </style:style>
  92.         <style:style style:name="Table1.A2" style:family="table-cell">
  93.             <style:properties fo:padding="0.097cm" fo:border-left="0.002cm solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.002cm solid #000000"/>
  94.         </style:style>
  95.         <style:style style:name="Table1.E2" style:family="table-cell">
  96.             <style:properties fo:padding="0.097cm" fo:border-left="0.002cm solid #000000" fo:border-right="0.002cm solid #000000" fo:border-top="none" fo:border-bottom="0.002cm solid #000000"/>
  97.         </style:style>
  98.         <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Text body" style:list-style-name="Ordered List"/>
  99.         <style:style style:name="T1" style:family="text" style:parent-style-name="Source Text">
  100.             <style:properties fo:font-style="normal"/>
  101.         </style:style>
  102.         
  103.         <style:page-master style:name="pm1">
  104.             <style:properties fo:page-width="20.999cm" fo:page-height="29.699cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2.54cm" fo:margin-bottom="2.54cm" fo:margin-left="3.175cm" fo:margin-right="3.175cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
  105.                 <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
  106.             </style:properties>
  107.             <style:header-style/>
  108.             <style:footer-style/>
  109.         </style:page-master>
  110.     </office:automatic-styles>
  111.     <office:master-styles>
  112.         <style:master-page style:name="Standard" style:page-master-name="pm1"/>
  113.     </office:master-styles>
  114.             <office:body>                 
  115.                 <xsl:apply-templates/>
  116.             </office:body>
  117.     </xsl:element>
  118. </xsl:template>
  119.  
  120. <xsl:template match="subtitle">
  121. <xsl:choose>
  122.     <xsl:when test="parent::table">
  123.             <xsl:apply-templates/>
  124.     </xsl:when>
  125.     <xsl:when test="parent::informaltable">
  126.             <xsl:apply-templates/>
  127.     </xsl:when>
  128.     <xsl:otherwise>
  129.         <xsl:element name="text:p">                
  130.                     <xsl:attribute name="text:style-name">Section SubTitle</xsl:attribute>
  131.         </xsl:element>
  132.     </xsl:otherwise>
  133. </xsl:choose>
  134. </xsl:template>
  135.  
  136.  
  137.  
  138.  
  139. <xsl:template match="title">
  140. <xsl:choose>
  141.     <xsl:when test="parent::figure">
  142.     </xsl:when>
  143.     <xsl:when test="parent::table">
  144.     </xsl:when>
  145.     <xsl:when test="parent::sect1">
  146.     </xsl:when>
  147. <xsl:when test="parent::sect2">
  148.     </xsl:when>
  149. <xsl:when test="parent::sect3">
  150.     </xsl:when>
  151. <xsl:when test="parent::sect4">
  152.     </xsl:when>
  153. <xsl:when test="parent::sect5">
  154.     </xsl:when>
  155.     <xsl:when test="parent::informaltable">
  156.             <xsl:apply-templates/>
  157.     </xsl:when>
  158.     
  159.     <xsl:otherwise>
  160.         <xsl:element name="text:p">                
  161.             <xsl:choose>    
  162.                 
  163.                 <xsl:when test="parent::appendix">
  164.                                  <xsl:attribute name="text:style-name">Appendix Title</xsl:attribute>     
  165.                 </xsl:when>
  166.              </xsl:choose>
  167.             <xsl:apply-templates/>
  168.         </xsl:element>
  169.     </xsl:otherwise>
  170. </xsl:choose>
  171. </xsl:template>
  172.  
  173. <xsl:template match="articleinfo">
  174.     <xsl:element name="text:section">
  175.         <xsl:attribute name="text:style-name">ArticleInfo</xsl:attribute>
  176.         <xsl:attribute name="text:name">ArticleInfo</xsl:attribute>
  177.             <xsl:if test="/article/articleinfo/title !=''">
  178.                          <xsl:element name="text:p">
  179.                             <xsl:attribute name="text:style-name">Document Title</xsl:attribute>
  180.                             <xsl:value-of select="/article/articleinfo/title"/>
  181.                         </xsl:element>
  182.                         <xsl:if test="/article/articleinfo/subtitle !=''">
  183.                             <xsl:element name="text:p">
  184.                                 <xsl:attribute name="text:style-name">Document SubTitle</xsl:attribute>
  185.                                 <xsl:value-of select="/article/articleinfo/subtitle"/>
  186.                             </xsl:element>
  187.                         </xsl:if>
  188.                  </xsl:if>
  189.             <xsl:apply-templates/>
  190.     </xsl:element>
  191.     
  192. </xsl:template>
  193.  
  194. <xsl:template match="appendix">
  195.     <xsl:element name="text:section">
  196.         <xsl:attribute name="text:style-name">Appendix</xsl:attribute>
  197.         <xsl:attribute name="text:name">Appendix</xsl:attribute>
  198.             <xsl:apply-templates/>
  199.     </xsl:element>
  200.     
  201. </xsl:template>
  202.  
  203. <!--
  204. <xsl:template match="author">
  205.     <xsl:apply-templates/>
  206. </xsl:template>
  207.  
  208. <xsl:template match="firstname">
  209.      <xsl:element name="text:variable-set">
  210.          <xsl:attribute name="text:name">
  211.              <xsl:if test="ancestor::articleinfo/author">
  212.                  <xsl:text disable-output-escaping="yes">articleinfo.author</xsl:text><xsl:value-of select="count(parent::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.firstname</xsl:text><xsl:value-of select="count(preceding-sibling::firstname)"/>
  213.              </xsl:if>
  214.         </xsl:attribute>
  215.         <xsl:apply-templates/>
  216.     </xsl:element>
  217.  
  218. </xsl:template>-->
  219.  
  220. <xsl:template match="articleinfo/title">
  221.     <!-- <xsl:element name="text:variable-decls">
  222.                  <xsl:element name="text:variable-decl">
  223.                      <xsl:attribute name="text:value-type">
  224.                          <xsl:text>string</xsl:text>    
  225.                      </xsl:attribute>
  226.                   <xsl:attribute name="text:name">
  227.                      <xsl:text disable-output-escaping="yes">articleinfo.title</xsl:text>
  228.                       </xsl:attribute>
  229.                    </xsl:element>
  230.                    
  231.           </xsl:element>
  232.           <xsl:element name="text:p">
  233.      <xsl:element name="text:variable-set">
  234.          <xsl:attribute name="text:value-type">
  235.                          <xsl:text>string</xsl:text>    
  236.                      </xsl:attribute>
  237.          <xsl:attribute name="text:name">
  238.              <xsl:text disable-output-escaping="yes">articleinfo.title</xsl:text>
  239.         </xsl:attribute>
  240.         <xsl:apply-templates/>
  241.     </xsl:element>    
  242.     </xsl:element>-->
  243. </xsl:template>
  244.  
  245. <xsl:template match="articleinfo/subtitle">
  246.      <xsl:element name="text:variable-decls">
  247.                  <xsl:element name="text:variable-decl">
  248.                      <xsl:attribute name="text:value-type">
  249.                          <xsl:text>string</xsl:text>    
  250.                      </xsl:attribute>
  251.                   <xsl:attribute name="text:name">
  252.                      <xsl:text disable-output-escaping="yes">articleinfo.subtitle</xsl:text>
  253.                       </xsl:attribute>
  254.                    </xsl:element>
  255.           </xsl:element>
  256.           <xsl:element name="text:p">
  257.      <xsl:element name="text:variable-set">
  258.          <xsl:attribute name="text:value-type">
  259.                          <xsl:text>string</xsl:text>    
  260.                      </xsl:attribute>
  261.          <xsl:attribute name="text:name">
  262.              <xsl:text disable-output-escaping="yes">articleinfo.subtitle</xsl:text>
  263.         </xsl:attribute>
  264.         <xsl:apply-templates/>
  265.     </xsl:element>
  266.     </xsl:element>
  267. </xsl:template>
  268.  
  269. <xsl:template match="articleinfo/edition">
  270.      <xsl:element name="text:variable-decls">
  271.                  <xsl:element name="text:variable-decl">
  272.                      <xsl:attribute name="text:value-type">
  273.                          <xsl:text>string</xsl:text>    
  274.                      </xsl:attribute>
  275.                   <xsl:attribute name="text:name">
  276.                      <xsl:text disable-output-escaping="yes">articleinfo.edition</xsl:text>
  277.                       </xsl:attribute>
  278.                    </xsl:element>
  279.           </xsl:element>
  280.           <xsl:element name="text:p">
  281.      <xsl:element name="text:variable-set">
  282.          <xsl:attribute name="text:value-type">
  283.                          <xsl:text>string</xsl:text>    
  284.                  </xsl:attribute>
  285.          <xsl:attribute name="text:name">
  286.              <xsl:text disable-output-escaping="yes">articleinfo.edition</xsl:text>
  287.         </xsl:attribute>
  288.         <xsl:apply-templates/>
  289.     </xsl:element>
  290.     </xsl:element>
  291. </xsl:template>
  292.  
  293. <xsl:template match="articleinfo/releaseinfo">
  294.       <xsl:element name="text:variable-decls">
  295.                  <xsl:element name="text:variable-decl">
  296.                      <xsl:attribute name="text:value-type">
  297.                          <xsl:text>string</xsl:text>    
  298.                      </xsl:attribute>
  299.                   <xsl:attribute name="text:name">
  300.                      <xsl:text disable-output-escaping="yes">articleinfo.releaseinfo_</xsl:text><xsl:value-of select="count(preceding-sibling::releaseinfo)"/>
  301.                       </xsl:attribute>
  302.                    </xsl:element>
  303.           </xsl:element>
  304.           <xsl:element name="text:p">
  305.      <xsl:element name="text:variable-set">
  306.          <xsl:attribute name="text:value-type">
  307.                          <xsl:text>string</xsl:text>    
  308.                 </xsl:attribute>
  309.          <xsl:attribute name="text:name">
  310.              <xsl:text disable-output-escaping="yes">articleinfo.releaseinfo_</xsl:text><xsl:value-of select="count(preceding-sibling::releaseinfo)"/>
  311.         </xsl:attribute>
  312.         <xsl:apply-templates/>
  313.     </xsl:element>
  314.     </xsl:element>
  315. </xsl:template>
  316.  
  317.  
  318. <xsl:template match="author/firstname">
  319.       <xsl:element name="text:variable-decls">
  320.                  <xsl:element name="text:variable-decl">
  321.                      <xsl:attribute name="text:value-type">
  322.                          <xsl:text>string</xsl:text>    
  323.                      </xsl:attribute>
  324.                     
  325.                   <xsl:attribute name="text:name">
  326.                       <xsl:if test="ancestor::articleinfo">
  327.                      <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text><xsl:value-of select="count(parent::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.firstname_</xsl:text><xsl:value-of select="count(preceding-sibling::firstname)"/>
  328.                  </xsl:if>
  329.                       </xsl:attribute>
  330.                    </xsl:element>
  331.           </xsl:element>
  332.           <xsl:element name="text:p">
  333.      <xsl:element name="text:variable-set">
  334.          <xsl:attribute name="text:value-type">
  335.                          <xsl:text>string</xsl:text>    
  336.                 </xsl:attribute>
  337.          <xsl:attribute name="text:name">
  338.              <xsl:if test="ancestor::articleinfo">
  339.                  <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text><xsl:value-of select="count(parent::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.firstname_</xsl:text><xsl:value-of select="count(preceding-sibling::firstname)"/>
  340.             </xsl:if>
  341.         </xsl:attribute>
  342.         <xsl:apply-templates/>
  343.     </xsl:element>
  344.     </xsl:element>
  345. </xsl:template>
  346.  
  347.  
  348.  
  349. <xsl:template match="articleinfo/copyright/year">
  350.       <xsl:element name="text:variable-decls">
  351.                  <xsl:element name="text:variable-decl">
  352.                      <xsl:attribute name="text:value-type">
  353.                          <xsl:text>string</xsl:text>    
  354.                      </xsl:attribute>
  355.                     
  356.                   <xsl:attribute name="text:name">
  357.                       <xsl:if test="ancestor::articleinfo/copyright">
  358.                      <xsl:text disable-output-escaping="yes">articleinfo.copyright_</xsl:text><xsl:value-of select="count(parent::copyright[preceding-sibling::copyright])"/><xsl:text disable-output-escaping="yes">.year_</xsl:text><xsl:value-of select="count(preceding-sibling::year)"/>
  359.                  </xsl:if>
  360.                       </xsl:attribute>
  361.                    </xsl:element>
  362.           </xsl:element>
  363.           <xsl:element name="text:p">
  364.      <xsl:element name="text:variable-set">
  365.          <xsl:attribute name="text:value-type">
  366.                          <xsl:text>string</xsl:text>    
  367.                 </xsl:attribute>
  368.          <xsl:attribute name="text:name">
  369.              <xsl:if test="ancestor::articleinfo/copyright">
  370.                      <xsl:text disable-output-escaping="yes">articleinfo.copyright_</xsl:text><xsl:value-of select="count(parent::copyright[preceding-sibling::copyright])"/><xsl:text disable-output-escaping="yes">.year_</xsl:text><xsl:value-of select="count(preceding-sibling::year)"/>
  371.                  </xsl:if>
  372.         </xsl:attribute>
  373.         <xsl:apply-templates/>
  374.     </xsl:element>
  375.     </xsl:element>
  376. </xsl:template>
  377.  
  378. <xsl:template match="authorgroup">
  379.     <xsl:apply-templates/>
  380. </xsl:template>
  381.  
  382. <xsl:template match="articleinfo/copyright/holder">
  383.       <xsl:element name="text:variable-decls">
  384.                  <xsl:element name="text:variable-decl">
  385.                      <xsl:attribute name="text:value-type">
  386.                          <xsl:text>string</xsl:text>    
  387.                      </xsl:attribute>
  388.                     
  389.                   <xsl:attribute name="text:name">
  390.                       <xsl:if test="ancestor::articleinfo/copyright">
  391.                      <xsl:text disable-output-escaping="yes">articleinfo.copyright_</xsl:text><xsl:value-of select="count(parent::copyright[preceding-sibling::copyright])"/><xsl:text disable-output-escaping="yes">.holder_</xsl:text><xsl:value-of select="count(preceding-sibling::holder)"/>
  392.                  </xsl:if>
  393.                       </xsl:attribute>
  394.                    </xsl:element>
  395.           </xsl:element>
  396.           <xsl:element name="text:p">
  397.      <xsl:element name="text:variable-set">
  398.          <xsl:attribute name="text:value-type">
  399.                          <xsl:text>string</xsl:text>    
  400.                 </xsl:attribute>
  401.          <xsl:attribute name="text:name">
  402.              <xsl:if test="ancestor::articleinfo/copyright">
  403.                      <xsl:text disable-output-escaping="yes">articleinfo.copyright_</xsl:text><xsl:value-of select="count(parent::copyright[preceding-sibling::copyright])"/><xsl:text disable-output-escaping="yes">.holder_</xsl:text><xsl:value-of select="count(preceding-sibling::holder)"/>
  404.                  </xsl:if>
  405.         </xsl:attribute>
  406.         <xsl:apply-templates/>
  407.     </xsl:element>
  408.     </xsl:element>
  409. </xsl:template>
  410.  
  411.  
  412.  
  413.  
  414. <xsl:template name="affiliation">
  415.     <xsl:apply-templates/>
  416. </xsl:template>
  417.  
  418. <xsl:template match="author/affiliation/address">
  419.       <xsl:element name="text:variable-decls">
  420.                  <xsl:element name="text:variable-decl">
  421.                      <xsl:attribute name="text:value-type">
  422.                          <xsl:text>string</xsl:text>    
  423.                      </xsl:attribute>
  424.                   <xsl:attribute name="text:name">
  425.                      <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text><xsl:value-of select="count(ancestor::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.affiliation_</xsl:text><xsl:value-of select="count(parent::affiliation[preceding-sibling::affiliation])"/><xsl:text disable-output-escaping="yes">.address_</xsl:text><xsl:value-of select="count(preceding-sibling::address)"/>
  426.                       </xsl:attribute>
  427.                    </xsl:element>
  428.           </xsl:element>
  429.           <xsl:element name="text:p">
  430.      <xsl:element name="text:variable-set">
  431.          <xsl:attribute name="text:value-type">
  432.                          <xsl:text>string</xsl:text>    
  433.                 </xsl:attribute>
  434.          <xsl:attribute name="text:name">
  435.              <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text><xsl:value-of select="count(ancestor::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.affiliation_</xsl:text><xsl:value-of select="count(parent::affiliation[preceding-sibling::affiliation])"/><xsl:text disable-output-escaping="yes">.address_</xsl:text><xsl:value-of select="count(preceding-sibling::address)"/>
  436.  
  437.         </xsl:attribute>
  438.         <xsl:apply-templates/>
  439.     </xsl:element>
  440.     </xsl:element>
  441. </xsl:template>
  442.  
  443. <xsl:template match="author/affiliation/orgname">
  444.       <xsl:element name="text:variable-decls">
  445.                  <xsl:element name="text:variable-decl">
  446.                      <xsl:attribute name="text:value-type">
  447.                          <xsl:text>string</xsl:text>    
  448.                      </xsl:attribute>
  449.                      <xsl:if test="ancestor::articleinfo">
  450.                   <xsl:attribute name="text:name">
  451.                      <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text><xsl:value-of select="count(ancestor::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.affiliation_</xsl:text><xsl:value-of select="count(parent::affiliation[preceding-sibling::affiliation])"/><xsl:text disable-output-escaping="yes">.orgname_</xsl:text><xsl:value-of select="count(preceding-sibling::orgname)"/>
  452.                       </xsl:attribute>
  453.                   </xsl:if>
  454.                    </xsl:element>
  455.           </xsl:element>
  456.           <xsl:element name="text:p">
  457.      <xsl:element name="text:variable-set">
  458.          <xsl:attribute name="text:value-type">
  459.                          <xsl:text>string</xsl:text>    
  460.                 </xsl:attribute>
  461.                  <xsl:if test="ancestor::articleinfo">
  462.          <xsl:attribute name="text:name">
  463.                  <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text><xsl:value-of select="count(ancestor::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.affiliation_</xsl:text><xsl:value-of select="count(parent::affiliation[preceding-sibling::affiliation])"/><xsl:text disable-output-escaping="yes">.orgname_</xsl:text><xsl:value-of select="count(preceding-sibling::orgname)"/>
  464.         </xsl:attribute>
  465.         </xsl:if>
  466.         <xsl:apply-templates/>        
  467.     </xsl:element>
  468.     </xsl:element>
  469. </xsl:template>
  470.  
  471.  
  472.  
  473. <xsl:template match="author/surname">
  474.       <xsl:element name="text:variable-decls">
  475.                  <xsl:element name="text:variable-decl">
  476.                      <xsl:attribute name="text:value-type">
  477.                          <xsl:text>string</xsl:text>    
  478.                      </xsl:attribute>
  479.                     
  480.                   <xsl:attribute name="text:name">
  481.                      <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text><xsl:value-of select="count(parent::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.surname_</xsl:text><xsl:value-of select="count(preceding-sibling::surname)"/>
  482.                       </xsl:attribute>
  483.                    </xsl:element>
  484.           </xsl:element>
  485.           <xsl:element name="text:p">
  486.      <xsl:element name="text:variable-set">
  487.         <xsl:attribute name="text:value-type">
  488.                          <xsl:text>string</xsl:text>    
  489.                 </xsl:attribute>
  490.          <xsl:attribute name="text:name">
  491.                  <xsl:text disable-output-escaping="yes">articleinfo.author_</xsl:text><xsl:value-of select="count(parent::author[preceding-sibling::author])"/><xsl:text disable-output-escaping="yes">.surname_</xsl:text><xsl:value-of select="count(preceding-sibling::surname)"/>
  492.  
  493.         
  494.         </xsl:attribute>
  495.         <xsl:apply-templates/>
  496.     </xsl:element>
  497.     </xsl:element>
  498. </xsl:template>
  499.  
  500.  
  501.  
  502.  
  503.  
  504. <xsl:template match="para">
  505. <xsl:choose>
  506. <xsl:when test="ancestor::varlistentry">
  507.         <xsl:element name="text:p">
  508.             <xsl:attribute name="text:style-name">VarList Term</xsl:attribute>
  509.             <xsl:apply-templates />
  510.         </xsl:element>
  511. </xsl:when>
  512. <xsl:otherwise>
  513.     <xsl:element name="text:p">
  514. <xsl:choose>
  515.     <xsl:when test="ancestor-or-self::footnote">
  516.          <xsl:attribute name= "text:style-name"><xsl:text>Footnote</xsl:text></xsl:attribute>
  517.     </xsl:when>
  518.     <xsl:when test="ancestor-or-self::listitem">
  519.          <xsl:attribute name= "text:style-name"><xsl:text>VarList Item</xsl:text></xsl:attribute>
  520.     </xsl:when>
  521.     <xsl:when test="ancestor-or-self::informaltable">
  522.         <xsl:if test="ancestor-or-self::informaltable">
  523.             <xsl:attribute name="text:style-name">Table Contents</xsl:attribute>
  524.         </xsl:if>
  525.         <xsl:if test="ancestor-or-self::thead ">
  526.             <xsl:attribute name="text:style-name">Table Heading</xsl:attribute>
  527.         </xsl:if>
  528.     </xsl:when>
  529.     <xsl:when test="ancestor-or-self::table">
  530.     <xsl:if test="ancestor-or-self::table">
  531.             <xsl:attribute name="text:style-name">Table Contents</xsl:attribute>
  532.         </xsl:if>
  533.         <xsl:if test="ancestor-or-self::thead ">
  534.             <xsl:attribute name="text:style-name">Table Heading</xsl:attribute>
  535.         </xsl:if>
  536.     </xsl:when>
  537.     <xsl:otherwise>
  538.             <xsl:attribute name="text:style-name">Text body</xsl:attribute>
  539.     </xsl:otherwise>
  540. </xsl:choose>
  541.         <xsl:apply-templates/>    
  542. </xsl:element>
  543.  
  544. </xsl:otherwise>
  545. </xsl:choose>
  546. </xsl:template>
  547.  
  548. <xsl:template match="section">
  549.     <xsl:element name="text:h">
  550.         <xsl:attribute name="text:level"><xsl:value-of select="count(ancestor-or-self::section) "/></xsl:attribute> 
  551.         <xsl:value-of select="child::title"/> 
  552.     </xsl:element>
  553.     <xsl:apply-templates/>
  554. </xsl:template>
  555.  
  556. <xsl:template match="abstract">
  557.     <xsl:element name="text:h">
  558.         <xsl:attribute name="text:level">1</xsl:attribute> 
  559.         <xsl:text>abstract</xsl:text>
  560.     </xsl:element>
  561.     <xsl:apply-templates/>
  562. </xsl:template>
  563.  
  564.  
  565. <xsl:template match="appendix">
  566.     <xsl:element name="text:h">
  567.         <xsl:attribute name="text:level">1</xsl:attribute> 
  568.         <xsl:text>appendix</xsl:text>
  569.     </xsl:element>
  570.     <xsl:apply-templates/>
  571. </xsl:template>
  572.  
  573. <xsl:template match="sect1">
  574.     <xsl:element name="text:h">
  575.         <xsl:attribute name="text:level">1</xsl:attribute>
  576.         <xsl:value-of select="child::title"/> 
  577.     </xsl:element>
  578.     <xsl:apply-templates/>
  579. </xsl:template>
  580.  
  581. <xsl:template match="sect2">
  582.     <xsl:element name="text:h">
  583.         <xsl:attribute name="text:level">2</xsl:attribute> 
  584.             <xsl:value-of select="child::title"/> 
  585.     </xsl:element>
  586.     <xsl:apply-templates/>
  587. </xsl:template>
  588.  
  589. <xsl:template match="sect3">
  590.     <xsl:element name="text:h">
  591.         <xsl:attribute name="text:level">3</xsl:attribute> 
  592.             <xsl:value-of select="child::title"/> 
  593.     </xsl:element>
  594.     <xsl:apply-templates/>
  595. </xsl:template>
  596.  
  597. <xsl:template match="sect4">
  598.     <xsl:element name="text:h">
  599.         <xsl:attribute name="text:level">4</xsl:attribute> 
  600.             <xsl:value-of select="child::title"/> 
  601.     </xsl:element>
  602.     <xsl:apply-templates/>
  603. </xsl:template>
  604.  
  605. <!--<xsl:template match="sect5">
  606.     <xsl:element name="text:section">
  607.         <xsl:attribute name="text:style-name">Sect1</xsl:attribute> 
  608.         <xsl:attribute name="text:name"><xsl:value-of select="@id"/></xsl:attribute>
  609.         <xsl:apply-templates/>
  610.     </xsl:element>
  611. </xsl:template>-->
  612.  
  613.  
  614. <xsl:template match="informaltable">
  615.     <xsl:element name="table:table">
  616.         <xsl:attribute name="table:name"></xsl:attribute>
  617.         <xsl:attribute name="table:style-name">Table1</xsl:attribute>
  618.         <xsl:attribute name="table:name"><xsl:value-of select="@id"/></xsl:attribute>
  619.         <xsl:apply-templates/>
  620.     </xsl:element>
  621. </xsl:template>
  622.  
  623.  
  624. <xsl:template match="table">
  625.     <xsl:variable name="tabletitle"><xsl:value-of select="title"/></xsl:variable>
  626.     <xsl:element name="table:table">
  627.         <xsl:attribute name="table:name"></xsl:attribute>
  628.         <xsl:attribute name="table:style-name">Table1</xsl:attribute>
  629.         <xsl:attribute name="table:name"><xsl:value-of select="@id"/></xsl:attribute>
  630.         <xsl:apply-templates/>
  631.     </xsl:element>
  632.     <xsl:if test="not($tabletitle='')">
  633.         <xsl:element name="text:p">
  634.             <xsl:attribute name="text:style-name">Table</xsl:attribute>
  635.                 <xsl:value-of select="$tabletitle"/>
  636.           </xsl:element>
  637.     </xsl:if>
  638. </xsl:template>
  639.  
  640. <xsl:template match="tgroup">
  641.     <xsl:element name="table:table-column">
  642.         <xsl:attribute name="table:style-name">Table1.A</xsl:attribute>
  643.         <xsl:choose>
  644.             <xsl:when test="@cols >0">
  645.                 <xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="@cols"/></xsl:attribute>
  646.             </xsl:when>
  647.             <xsl:otherwise>
  648.                 <xsl:attribute name="table:number-columns-repeated"><xsl:value-of select="count(child::tbody/row/entry) div count(child::tbody/row) "/></xsl:attribute>
  649.             </xsl:otherwise>
  650.         </xsl:choose>
  651.     </xsl:element>
  652.     <xsl:apply-templates/>
  653. </xsl:template>
  654.  
  655.  
  656. <xsl:template match="indexterm">
  657. </xsl:template>
  658.  
  659. <xsl:template match="thead">
  660.     <xsl:element name="table:table-header-rows">
  661.         <xsl:apply-templates />
  662.     </xsl:element>
  663. </xsl:template>
  664.  
  665. <xsl:template match="tbody">
  666.         <xsl:apply-templates />
  667. </xsl:template>
  668.  
  669. <xsl:template match="row">
  670.     <xsl:element name="table:table-row">
  671.         <xsl:apply-templates/>
  672.     </xsl:element>
  673. </xsl:template>
  674.  
  675. <xsl:template match="entry">
  676.     <xsl:element name="table:table-cell">
  677.         <xsl:if test="ancestor-or-self::thead">
  678.             <xsl:attribute name="table:style-name">Table1.A1</xsl:attribute>
  679.         </xsl:if>
  680.         <xsl:if test="not(ancestor-or-self::thead)">
  681.             <xsl:attribute name="table:style-name">Table1.A2</xsl:attribute>
  682.         </xsl:if>
  683.         
  684.         <xsl:choose>
  685.             <xsl:when test="@spanname">
  686.         <!--<xsl:if test="@spanname">-->
  687.                 <xsl:variable name="sname" >
  688.                     <xsl:value-of select="@spanname"/>
  689.                 </xsl:variable>
  690.                 <xsl:attribute name="table:number-columns-spanned">
  691.                     <xsl:variable name="colnamestart">
  692.                         <xsl:value-of select="ancestor::tgroup/spanspec[@spanname=$sname]/@namest"/>
  693.                     </xsl:variable>
  694.                     <xsl:variable name="colnameend">
  695.                         <xsl:value-of select="ancestor::tgroup/spanspec[@spanname=$sname]/@nameend"/>
  696.                     </xsl:variable>
  697.                     <xsl:variable name="colnumstart">
  698.                         <xsl:value-of select="ancestor::tgroup/colspec[@colname=$colnamestart]/@colnum"/>
  699.                     </xsl:variable>
  700.                     <xsl:variable name="colnumend">
  701.                         <xsl:value-of select="ancestor::tgroup/colspec[@colname=$colnameend]/@colnum"/>
  702.                     </xsl:variable>
  703.                     <xsl:value-of select="$colnumend - $colnumstart + 1"/>
  704.                   </xsl:attribute >
  705.         </xsl:when>
  706.         <xsl:when  test="@namest and @nameend">
  707.         <!--<xsl:if test="@namest and @nameend">-->
  708.             <xsl:variable name="colnamestart">
  709.                     <xsl:value-of select="@namest"/>
  710.             </xsl:variable>
  711.             <xsl:variable name="colnameend">
  712.                     <xsl:value-of select="@nameend"/>
  713.             </xsl:variable>
  714.  
  715.             <xsl:attribute name="table:number-columns-spanned">
  716.             <xsl:variable name="colnumstart">
  717.                         <xsl:value-of select="ancestor::tgroup/colspec[@colname=$colnamestart]/@colnum"/>
  718.                     </xsl:variable>
  719.                     <xsl:variable name="colnumend">
  720.                         <xsl:value-of select="ancestor::tgroup/colspec[@colname=$colnameend]/@colnum"/>
  721.                     </xsl:variable>
  722.                     <xsl:value-of select="$colnumend - $colnumstart + 1"/>
  723.  
  724.             </xsl:attribute >
  725.         </xsl:when>
  726.         </xsl:choose>
  727.         <!--
  728.         <xsl:if test="not(@namest = '' ) ">
  729.              <xsl:attribute name="table:number-columns-spanned">
  730.                  <xsl:value-of select="(substring-after(@nameend,'c')-substring-after(@namest,'c'))+1"/>
  731.                  
  732.              </xsl:attribute>
  733.         </xsl:if>
  734.         -->
  735.         <xsl:choose>
  736.             <xsl:when test="not(child::para)">
  737.                 <xsl:element name="text:p">
  738.                         <xsl:if test="ancestor-or-self::thead">
  739.                             <xsl:attribute name="text:style-name">Table Heading</xsl:attribute>
  740.                         </xsl:if>
  741.                         <xsl:if test="ancestor-or-self::tbody">
  742.                             <xsl:attribute name="text:style-name">Table Contents</xsl:attribute>
  743.                         </xsl:if>
  744.                         <xsl:apply-templates/>
  745.                 </xsl:element>
  746.             </xsl:when>
  747.             <xsl:otherwise>
  748.                 <xsl:apply-templates/>
  749.             </xsl:otherwise>
  750.         </xsl:choose>
  751.     </xsl:element>
  752. </xsl:template>
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759. <xsl:template match="figure">
  760.     <xsl:apply-templates/>
  761. </xsl:template>
  762.  
  763. <!--  lists          Section                                          -->
  764.  
  765.  
  766.  
  767. <xsl:template match="itemizedlist">
  768.     <xsl:element name="text:unordered-list">
  769.     <xsl:attribute name="text:style-name">Itemized List</xsl:attribute>
  770.             <xsl:attribute name="text:continue-numbering">false</xsl:attribute>
  771.             <xsl:apply-templates/>
  772.     </xsl:element>
  773. </xsl:template>
  774.  
  775. <xsl:template match="variablelist">
  776.     <xsl:element name="text:unordered-list">
  777.         <xsl:attribute name="text:style-name">Var List</xsl:attribute>
  778.             <xsl:attribute name="text:continue-numbering">false</xsl:attribute>
  779.         <xsl:apply-templates />
  780.     </xsl:element>
  781. </xsl:template>
  782.  
  783. <xsl:template match="orderedlist">
  784. <xsl:element name="text:ordered-list">
  785.     <xsl:attribute name="text:style-name">Ordered List</xsl:attribute>
  786.     <xsl:attribute name="text:continue-numbering">false</xsl:attribute>
  787.     <xsl:apply-templates/>    
  788. </xsl:element>
  789. </xsl:template>
  790.  
  791. <xsl:template match="term">
  792.     <xsl:if test="parent::varlistentry">
  793.     <text:list-item>
  794.     <xsl:element name="text:p">
  795.         <xsl:attribute name="text:style-name">VarList Term</xsl:attribute>
  796.         <xsl:apply-templates />
  797.     </xsl:element>
  798.         </text:list-item>
  799.     </xsl:if>
  800. </xsl:template>
  801.  
  802.  
  803. <xsl:template match="listitem">
  804.     <xsl:choose>
  805.         <xsl:when test="parent::varlistentry">
  806.                     <text:list-item>
  807.                         <xsl:apply-templates/>
  808.                         </text:list-item>
  809.         </xsl:when>
  810.         <xsl:otherwise>
  811.                 <text:list-item>
  812.                         <xsl:apply-templates/>
  813.                 </text:list-item>
  814.         </xsl:otherwise>    
  815.     </xsl:choose>
  816. </xsl:template>
  817.  
  818.  
  819. <!--  end of lists-->
  820.  
  821. <xsl:template match="menuchoice">
  822.     <xsl:apply-templates/>
  823. </xsl:template>
  824.  
  825. <xsl:template match="guimenuitem">
  826.     <xsl:element name="text:span">
  827.             <xsl:attribute name="text:style-name">GuiMenuItem</xsl:attribute>
  828.             <xsl:apply-templates/>
  829.     </xsl:element>
  830. </xsl:template>
  831.  
  832. <xsl:template match="guibutton">
  833.     <xsl:element name="text:span">
  834.             <xsl:attribute name="text:style-name">GuiButton</xsl:attribute>
  835.             <xsl:apply-templates/>
  836.     </xsl:element>
  837. </xsl:template>
  838.  
  839. <xsl:template match="guisubmenu">
  840.     <xsl:element name="text:span">
  841.             <xsl:attribute name="text:style-name">GuiSubMenu</xsl:attribute>
  842.             <xsl:apply-templates/>
  843.     </xsl:element>
  844. </xsl:template>
  845.  
  846. <xsl:template match="emphasis">
  847.         <xsl:element name="text:span">
  848.             <xsl:attribute name="text:style-name">Emphasis</xsl:attribute>
  849.             <xsl:apply-templates/>
  850.     </xsl:element>
  851. </xsl:template>
  852.  
  853.  
  854. <xsl:template match="guimenu">
  855.         <xsl:element name="text:span">
  856.             <xsl:attribute name="text:style-name">GuiMenu</xsl:attribute>
  857.             <xsl:apply-templates/>
  858.     </xsl:element>
  859. </xsl:template>
  860.  
  861. <xsl:template match="guisubmenu">
  862.         <xsl:element name="text:span">
  863.             <xsl:attribute name="text:style-name">GuiSubMenu</xsl:attribute>
  864.             <xsl:apply-templates/>
  865.     </xsl:element>
  866. </xsl:template>
  867.  
  868.  
  869. <xsl:template match="guilabel">
  870.     <xsl:element name="text:span">
  871.             <xsl:attribute name="text:style-name">GuiLabel</xsl:attribute>
  872.             <xsl:apply-templates/>
  873.     </xsl:element>
  874. </xsl:template>
  875.  
  876. <xsl:template match="guibutton">
  877.     <xsl:element name="text:span">
  878.             <xsl:attribute name="text:style-name">GuiButton</xsl:attribute>
  879.             <xsl:apply-templates/>
  880.     </xsl:element>
  881. </xsl:template>
  882.  
  883. <xsl:template match="keycap">
  884.     <xsl:element name="text:span">
  885.         <xsl:attribute name="text:style-name">KeyCap</xsl:attribute>
  886.         <xsl:apply-templates/>
  887.     </xsl:element>
  888. </xsl:template>
  889.  
  890.  
  891. <xsl:template match="keysym">
  892.     <xsl:element name="text:span">
  893.         <xsl:attribute name="text:style-name">KeySym</xsl:attribute>
  894.         <xsl:apply-templates/>
  895.     </xsl:element>
  896. </xsl:template>
  897.  
  898.  
  899. <xsl:template match="keycombo">
  900.     <xsl:element name="text:span">
  901.         <xsl:attribute name="text:style-name">KeyCombo</xsl:attribute>
  902.         <xsl:apply-templates/>
  903.     </xsl:element>
  904. </xsl:template>
  905.  
  906. <xsl:template match="command">
  907.     <xsl:element name="text:span">
  908.         <xsl:attribute name="text:style-name">Command</xsl:attribute>
  909.         <xsl:apply-templates/>
  910.     </xsl:element>
  911. </xsl:template>
  912.  
  913. <xsl:template match="application">
  914.     <xsl:element name="text:span">
  915.         <xsl:attribute name="text:style-name">Application</xsl:attribute>
  916.         <xsl:apply-templates/>
  917.     </xsl:element>
  918. </xsl:template>
  919.  
  920. <xsl:template match="filename">
  921.     <xsl:element name="text:span">
  922.         <xsl:attribute name="text:style-name">FileName</xsl:attribute>
  923.         <xsl:apply-templates/>
  924.     </xsl:element>
  925. </xsl:template>
  926.  
  927. <xsl:template match="systemitem">
  928.     <xsl:element name="text:span">
  929.         <xsl:attribute name="text:style-name">SystemItem</xsl:attribute>
  930.         <xsl:apply-templates/>
  931.     </xsl:element>
  932. </xsl:template>
  933.  
  934. <xsl:template match="computeroutput">
  935.     <xsl:element name="text:span">
  936.         <xsl:attribute name="text:style-name">ComputerOutput</xsl:attribute>
  937.         <xsl:apply-templates/>
  938.     </xsl:element>
  939. </xsl:template>
  940.  
  941. <xsl:template match="inlinegraphic">
  942.     <xsl:element name="draw:image">
  943.         <xsl:attribute name="draw:style-name">
  944.             <xsl:text>fr1</xsl:text>
  945.         </xsl:attribute>
  946.         <xsl:attribute name="draw:name">
  947.         </xsl:attribute>
  948.         <xsl:attribute name="text:anchor-type">
  949.         </xsl:attribute>
  950.         <xsl:attribute name="draw:z-index">
  951.         </xsl:attribute>
  952.         <xsl:attribute name="xlink:href">
  953.             <xsl:value-of select="@fileref"/>
  954.         </xsl:attribute>
  955.         <xsl:attribute name="xlink:type">
  956.         </xsl:attribute>
  957.         <xsl:attribute name="svg:width">
  958.             <!--<xsl:value-of select="@width"/>-->
  959.             <xsl:text>1cm</xsl:text>
  960.         </xsl:attribute> 
  961.         <xsl:attribute name="svg:height">    
  962.             <xsl:text>1cm</xsl:text>
  963.         </xsl:attribute>
  964.         <xsl:attribute name="xlink:show">
  965.             <xsl:text>embed</xsl:text>
  966.         </xsl:attribute>
  967.         <xsl:attribute name="xlink:actuate">
  968.             <xsl:text>onLoad</xsl:text>
  969.         </xsl:attribute>
  970.         <xsl:attribute name="draw:filter-name">
  971.             <xsl:text disable-output-escaping="yes"><All formats></xsl:text>
  972.         </xsl:attribute>
  973. </xsl:element>
  974. </xsl:template> 
  975.  
  976.  
  977. <xsl:template match="footnote">
  978.     <xsl:element name="text:footnote">
  979.         <!--<xsl:element name="text:footnote-citation">Aidan</xsl:element>-->
  980.         <xsl:element name="text:footnote-body">
  981.                 <xsl:apply-templates/>
  982.         </xsl:element>
  983.     </xsl:element>
  984. </xsl:template>
  985.  
  986. <xsl:template match="highlight">
  987.     <xsl:element name="text:span">
  988.         <xsl:attribute name="text:style-name">
  989.             <xsl:text>Highlight</xsl:text>
  990.         </xsl:attribute>
  991.         <xsl:apply-templates/>
  992.     </xsl:element>
  993. </xsl:template>
  994.  
  995. <xsl:template match="ulink">
  996.         <xsl:element name="text:a">
  997.         <xsl:attribute name="xlink:type"><xsl:text>simple</xsl:text></xsl:attribute>
  998.         <xsl:attribute name="xlink:href">
  999.             <xsl:value-of select="@url"/>
  1000.         </xsl:attribute>
  1001.         <xsl:apply-templates/>
  1002.     </xsl:element>
  1003.  
  1004. </xsl:template>
  1005.  
  1006. <xsl:template match="link">
  1007.     <xsl:element name="text:a">
  1008.         <xsl:attribute name="xlink:type"><xsl:text>simple</xsl:text></xsl:attribute>
  1009.         <xsl:attribute name="xlink:href">
  1010.             <xsl:text>#</xsl:text>
  1011.                 <xsl:value-of select="@linkend"/>
  1012.             <xsl:text>%7Cregion</xsl:text>
  1013.         </xsl:attribute>
  1014.         <xsl:apply-templates/>
  1015.     </xsl:element>
  1016.  
  1017. </xsl:template>
  1018.  
  1019. <xsl:template match="olink">
  1020. <xsl:element name="text:a">
  1021.         <xsl:attribute name="xlink:type"><xsl:text>simple</xsl:text></xsl:attribute>
  1022.         <xsl:attribute name="xlink:href">
  1023.             <xsl:value-of select="@targetdocent"/>
  1024.         </xsl:attribute>
  1025.         <xsl:apply-templates/>
  1026.     </xsl:element>
  1027. </xsl:template>
  1028.  
  1029. <xsl:template match="note">
  1030.     <office:annotation>
  1031.         <text:p>
  1032.             <xsl:apply-templates/>
  1033.         </text:p>
  1034.     </office:annotation>
  1035. </xsl:template>
  1036.  
  1037. <xsl:template match="imageobject">
  1038.     <xsl:apply-templates/>
  1039. </xsl:template>
  1040.  
  1041. <xsl:template match="textobject">
  1042. </xsl:template>
  1043.  
  1044. <xsl:template match="caption">
  1045.     <xsl:apply-templates/>
  1046. </xsl:template>
  1047.  
  1048.  
  1049. <xsl:template match="imagedata">
  1050.     <xsl:element name="draw:image">
  1051.         <xsl:attribute name="draw:style-name">
  1052.             <xsl:text>fr1</xsl:text>
  1053.         </xsl:attribute>
  1054.         <xsl:attribute name="draw:name">
  1055.         </xsl:attribute>
  1056.         <xsl:attribute name="text:anchor-type">
  1057.         </xsl:attribute>
  1058.         <xsl:attribute name="draw:z-index">
  1059.         </xsl:attribute>
  1060.         <xsl:attribute name="xlink:href">
  1061.             <xsl:value-of select="@fileref"/>
  1062.         </xsl:attribute>
  1063.         <xsl:attribute name="xlink:type">
  1064.         </xsl:attribute>
  1065.         <xsl:attribute name="svg:width">
  1066.             <!--<xsl:value-of select="@width"/>-->
  1067.             <xsl:text>1cm</xsl:text>
  1068.         </xsl:attribute> 
  1069.         <xsl:attribute name="svg:height">    
  1070.             <xsl:text>1cm</xsl:text>
  1071.         </xsl:attribute>
  1072.         <xsl:attribute name="xlink:show">
  1073.             <xsl:text>embed</xsl:text>
  1074.         </xsl:attribute>
  1075.         <xsl:attribute name="xlink:actuate">
  1076.             <xsl:text>onLoad</xsl:text>
  1077.         </xsl:attribute>
  1078.         <xsl:attribute name="draw:filter-name">
  1079.             <xsl:text disable-output-escaping="yes"><All formats></xsl:text>
  1080.         </xsl:attribute>
  1081.     </xsl:element>
  1082. </xsl:template>
  1083.  
  1084. <xsl:template match="audioobject">
  1085.     <xsl:element name="draw:plugin">
  1086.         <xsl:attribute name="draw:style-name">
  1087.             <xsl:text>fr1</xsl:text>
  1088.         </xsl:attribute>
  1089.         <xsl:attribute name="draw:name">
  1090.         </xsl:attribute>
  1091.         <xsl:attribute name="text:anchor-type">
  1092.         </xsl:attribute>
  1093.         <xsl:attribute name="draw:z-index">
  1094.         </xsl:attribute>
  1095.         <xsl:attribute name="xlink:href">
  1096.             <xsl:value-of select="@fileref"/>
  1097.         </xsl:attribute>
  1098.         <xsl:attribute name="xlink:type">
  1099.         </xsl:attribute>
  1100.         <xsl:attribute name="svg:width">
  1101.             <!--<xsl:value-of select="@width"/>-->
  1102.             <xsl:text>1cm</xsl:text>
  1103.         </xsl:attribute> 
  1104.         <xsl:attribute name="svg:height">    
  1105.             <xsl:text>1cm</xsl:text>
  1106.         </xsl:attribute>
  1107.         <xsl:attribute name="xlink:show">
  1108.             <xsl:text>embed</xsl:text>
  1109.         </xsl:attribute>
  1110.         <xsl:attribute name="xlink:actuate">
  1111.             <xsl:text>onLoad</xsl:text>
  1112.         </xsl:attribute>
  1113.         <xsl:attribute name="draw:filter-name">
  1114.             <xsl:text disable-output-escaping="yes"><All formats></xsl:text>
  1115.         </xsl:attribute>
  1116.     </xsl:element>
  1117. </xsl:template>
  1118.  
  1119. <xsl:template match="remark">
  1120.     <xsl:apply-templates/>
  1121. </xsl:template>
  1122.  
  1123. <xsl:template match="mediaobject">
  1124.     <xsl:element name="text:p">
  1125.         <xsl:attribute name="text:style-name"><xsl:text>Mediaobject</xsl:text></xsl:attribute>
  1126.     <xsl:apply-templates/>
  1127.     </xsl:element>
  1128. </xsl:template>
  1129.  
  1130. <xsl:template match="superscript">
  1131.     <xsl:element name="text:span">
  1132.         <xsl:attribute name="text:style-name">
  1133.             <xsl:text>SuperScript</xsl:text>
  1134.         </xsl:attribute>
  1135.         <xsl:apply-templates/>
  1136.     </xsl:element>
  1137. </xsl:template>
  1138.  
  1139. <xsl:template match="subscript">
  1140.     <xsl:element name="text:span">
  1141.         <xsl:attribute name="text:style-name">
  1142.             <xsl:text>SubScript</xsl:text>
  1143.         </xsl:attribute>
  1144.         <xsl:apply-templates/>
  1145.     </xsl:element>
  1146. </xsl:template>
  1147.  
  1148.  
  1149.  
  1150. </xsl:stylesheet>
  1151.